Repository navigation
merge: sync upstream b17e605 (resumable update downloads) - #29
Merged
Merged
Conversation
The assertion merged with vivaui#310 only checked that the script mentions Restore; Launch, which an empty Launch body would still satisfy. Assert the helper definition, the forwarded argument list and both rollback paths. Based on the stronger assertion from vivaui#311 by 1lck.
…the fork # Conflicts: # update/install_windows_test.go
28 of 32 tasks
xiaoyumuxi
added a commit
to 1lck/Lithe-IDEA
that referenced
this pull request
Nov 16, 2026
* build(desktop): Viva 升级到 fork 944e3e5(上游 b17e605,更新下载可断点续传) fork main 97fdbdd 合入上游 89ce846..b17e605 的 13 个提交(Lithe-IDEA/Lithe-viva#29), 其中 vivaui/viva#324 让 update.Download/DownloadPatch 断开后用 Range 接着下, 并新增 ErrInterrupted。唯一冲突在 update/install_windows_test.go,按上游解决。 require 改为上游基线 b17e605,replace 改为 fork 944e3e5。 * fix(desktop): 更新与插件市场下载断开后接着下,一分钟没有数据才超时 应用更新和插件市场的下载断开后都从头再下。更新包几百 MB,网络不稳时可能一直下不完; 插件下载连同检查、解压一共只有 5 分钟,大包在慢网络上会超时。 应用更新(Viva update,见 vivaui/viva#324): - 断开、取消、服务器错误或一分钟没有收到数据时保留已下载的部分,下次用 HTTP Range 接着下;服务器不支持时从头下,已校验的文件直接复用。 - 补丁下载被打断(appupdate.ErrInterrupted)不算补丁失败,不改下完整包,也不记 delta fallback;下次接着下补丁。 - 下载开始时删除其他版本的缓存目录,缓存只留当前版本;删除失败记录 app.background.operation_failed(update_download_cleanup)。 插件市场: - 下载不限总时长,一分钟没有收到数据结束,报 ErrArchiveStalled(界面显示“操作超时”); 检查与解压仍限 5 分钟(pluginPrepareTimeout)。 - ArchiveSession 保留被打断的传输,同一设置窗口里再下载同一个包时用 Range 接着下; 服务器忽略、错位或拒绝 Range 时从头下;接上的内容与索引摘要不符时丢弃并报校验失败。 会话最多保留一份文件,换包或关闭时删除。 测试:updates_test.go 覆盖补丁续传不改下完整包、清理其他版本;download_resume_test.go 覆盖续传、Range 各种回应、换包、停滞结束、下载不受总时长限制、保留内容不对时丢弃; plugins_test.go 覆盖市场下载不受检查与解压时限约束。 依赖 Viva 的 ErrInterrupted:上游 b17e605(vivaui/viva#324)提供,前一个提交已把 replace 升级到包含它的 fork commit。 * refactor(desktop): 删除续传后不再被生产代码调用的 DownloadWithProgress ArchiveSession 改为调用支持续传的 download 后,ArchiveDownloader.DownloadWithProgress 只剩 Download 和一个进度测试在用。把它并入 Download(无进度、被打断的部分直接删除), 进度回调的约束移到 ArchiveSession.Download 的注释里;进度测试改走 ArchiveSession, 与生产路径一致。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge upstream main
b17e605into fork main97fdbdd. Merge this PR with a merge commit, never squash, so upstream stays an ancestor of fork main and every published Lithe pin stays reachable.Upstream range
89ce846..b17e605, 13 commits:b17e605fix(update): resume an interrupted download (fix(update): resume an interrupted download vivaui/viva#324)47dabd4feat(fonts): choose interface and fixed-pitch weights on Windows (feat(fonts): choose the weights of the interface and fixed-pitch text vivaui/viva#321)9260f72fix(linux): maximize both axes from the title bar (fix(linux): linux下窗口默认是垂直最大化,再点最大会只会变成水平最大化,再点一次又变成垂直最大化 vivaui/viva#319)9355232fix(linux): publish accessibility on the first window and resize (fix(linux): publish accessibility on first-window and resize paths vivaui/viva#320)71d9312test(darwin): serialize posted-drain assertions on the main queue (test(darwin): serialize posted-drain assertions on the main queue vivaui/viva#322)10c5b92fix(update): launch Windows helpers without DETACHED_PROCESS (fix(update): launch Windows helpers without DETACHED_PROCESS vivaui/viva#323)7e8f0d9test(update): pin the recovery launch and its arguments8f8f38dfeat(darwin): forward opt-in tentative composition phases (darwin: forward opt-in tentative composition phases vivaui/viva#317)74b6fc7fix(app): keep handled pointer events out of caret placement (fix(app): preserve pointer selection ownership and reset click anchors vivaui/viva#315)2c0c872feat(clipboard): preserve Windows column selection metadata (app: preserve Windows rectangular clipboard formats and paste provenance vivaui/viva#309)e9a6a7afix(components): keep a menu row unlit on menu padding (fix(components): keep a menu row unlit while the pointer is on the menu vivaui/viva#306)61a660ffix(text): retain LF labels when composition compacts backing (fix(text): retain LF labels when composition compacts history backing vivaui/viva#313)b987c21test(update): expect the Windows recovery launcher (test(update): expect the Windows recovery launcher vivaui/viva#310)Conflict
One, in
update/install_windows_test.go(TestPayloadHelperScriptKeepsABackupAndRestores). The fork'saaf3285asserted{ Restore; Launch; exit 1 }; upstream asserts the full lineif ($p.HasExited -and $p.ExitCode -ne 0) { Restore; Launch; exit 1 }. Resolved to upstream's side. The mergedupdate/install_windows.gois byte-identical to upstream and contains that line, so the stronger assertion holds. The wholeupdate/directory is now identical to upstream.Fork patches
b17e605(fix(update): resume an interrupted download vivaui/viva#324). It will be closed once this merges.Validation
On macOS 27 / arm64, Go 1.27.4 (module
go 1.26.0), on944e3e5:gofmt -l $(git ls-files '*.go'): clean.go vet ./...: clean (only the existingdidModifyRange:deprecation warning from cgo).GOOS=windows GOARCH=amd64 go build ./...andGOOS=windows GOARCH=arm64 go build ./...: pass.GOOS=linux GOARCH=amd64 go vet ./update/ ./ui/ ./components/: clean.go test ./... -count=1: everything passes except 14 packaging tests incmd/viva(the program was built for macOS 13.0 or later but [mac] min_system says 12.0). That is the local toolchain: the same test fails on fork main97fdbddbefore this merge, and fix(update): resume an interrupted download vivaui/viva#324 records the same failure on upstream.git merge-base --is-ancestor upstream/main HEAD: true.git ls-remote --tags --refs https://github.com/vivaui/viva.git; no tag push needed.